from django.urls import path
from . import views

app_name = 'forum'

urlpatterns = [
    # 帖子总表
    path('', views.post_list, name='post_list'),
    # 发布帖子
    path('create/', views.post_create, name='post_create'),
    # 帖子
    path('<int:pk>/', views.post_detail, name='post_detail'),
    # 添加评论
    path('<int:pk>/comment/', views.add_comment, name='add_comment'),

    # 用户的帖子列表
    path('user/posts/', views.user_posts, name='user_posts'),
    # 用户的评论列表
    path('user/comments/', views.user_comments, name='user_comments'),
    # 删除个人帖子
    path('post/delete/<int:pk>/', views.delete_post, name='delete_post'),
    # 删除个人回复
    path('comment/delete/<int:pk>/', views.delete_comment, name='delete_comment'),
]